home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 2000 July / macformat-092.iso / MacFormat 92 CD / Shareware Plus / Utilities / FolderSynchronizer 1.8.9 / FoldersSynchronizer / FoldersSynchronizer.9 / AllScripts_52.ls < prev    next >
Encoding:
Text File  |  2000-05-10  |  655 b   |  22 lines

  1. on mouseDown me
  2.   global gMaxMulti, gCurrMulti
  3.   if stageTop() = 0 then
  4.     exit
  5.   end if
  6.   set mySprite to the spriteNum of me
  7.   set ContrsSprite to mySprite + 4
  8.   set deltaV to the mouseV - the locV of sprite mySprite
  9.   repeat while the stillDown
  10.     set HA to float(the locV of sprite mySprite) - float(the top of sprite ContrsSprite)
  11.     set Perc to HA / float(the height of sprite ContrsSprite)
  12.     set GoTo to integer(gMaxMulti * Perc)
  13.     if GoTo = 0 then
  14.       set GoTo to 1
  15.     end if
  16.     set the locV of sprite mySprite to constrainV(ContrsSprite, the mouseV - deltaV)
  17.     updateStage()
  18.   end repeat
  19.   updateStage()
  20.   set gCurrMulti to GoTo
  21. end
  22.